<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<div class="container_0 clearfix">
	<div class="box no-border">
		<div class="header">
			<h2>${pageTitle}</h2>
		</div>
		<isperp:grid url="provider/provider/list" gridId="providerGrid"
			gridTitle="${pageTitle}" cusEditUrl="provider/provider/edit"
			cusFormatterActions="true" 
			ondbClickRowEvent="providerGrid.edit(rowid);"
			cusDeleteUrl="provider/provider/delete"
			excelExportUrl="provider/provider/excelExport">

			<jsp:attribute name="toolbar">
 				<isperp:toolbar id="userToolbar">
	 				<isperp:button id="userCreate" icon="icon-plus" text="新增供应商"  cssClass="nui-mainbtn"
						onclick="providerGrid.create();"></isperp:button>
	 				
 				</isperp:toolbar>
			</jsp:attribute>

			<jsp:attribute name="searchbar">
				<table class="search-table">
					<tbody>
						<tr>
							<td align="right">名称：</td>
							<td><input type="text" field="name" op="cn">
							</td>
							<td align="right">联系人：</td>
							<td><input type="text" field="linkman" op="cn">
							</td>
						</tr>
					</tbody>
				</table>
			</jsp:attribute>
			<jsp:body>
				<isperp:column name="id" title="id" hidden="true"></isperp:column>		
				<isperp:column name="name" title="名称" width="120">
				</isperp:column>
				<isperp:column name="website" title="网址" width="100"
					isFormatterFun="true" formatter="return nameFormatter(cellvalue);">
				</isperp:column>
				<isperp:column name="serviceTel" title="客服电话" 
					width="90">
				</isperp:column>
				<isperp:column name="salesTel" title="销售电话" 
					width="90">
				</isperp:column>
				<isperp:column name="supportTel" title="技术支持电话" 
					width="90">
				</isperp:column>
				<isperp:column name="complainTel" title="投诉电话" 
					width="90">
				</isperp:column>
				<isperp:column name="fax" title="传真"  width="80">
				</isperp:column>
			</jsp:body>

		</isperp:grid>
		<isperp:operate code="PRD_PROVIDER"></isperp:operate>
	</div>

</div>
<script type="text/javascript">
	function nameFormatter(cellvalue) {
		return "<a target='blank' href='"+ cellvalue +"'>" + cellvalue + "</a>";
	}
</script>
